package com.yanqu.road.entity.activity.fivehero.cross;


import java.util.Comparator;

public class CrossFiveHeroRankSort implements Comparator<CrossFiveHeroRank> {
    @Override
    public int compare(CrossFiveHeroRank o1, CrossFiveHeroRank o2) {
        if (o2.getValue() != o1.getValue()) {
            return Long.compare(o2.getValue(), o1.getValue());
        }
        if(o1.getTime() != o2.getTime()){
            return Long.compare(o1.getTime(), o2.getTime());
        }
        if (o2.getAbility() != o1.getAbility()) {
            return Long.compare(o2.getAbility(), o1.getAbility());
        }
        return Long.compare(o2.getAbility(), o1.getAbility());
    }
}
